package com.htfyun.eink.pw.draw.pen.epd;

import com.htfyun.eink.pw.draw.pen.epd.data.NeoRenderPoint;
import com.htfyun.eink.pw.draw.pointer.PWPointer;

import java.util.ArrayList;
import java.util.List;

public abstract class EPDBaseManager {

    protected final List<NeoRenderPoint> renderPoints = new ArrayList<>();

    public abstract void onDown(PWPointer pointer);

    public abstract void onMove(PWPointer pointer);

    public abstract void onUp(PWPointer pointer);

    public abstract void setStrokeWidth(float strokeWidth);

    public List<NeoRenderPoint> getRenderPoints() {
        return renderPoints;
    }

    public void clear() {
        renderPoints.clear();
    }

    public NeoRenderPoint createRenderPointerBy(PWPointer point, float size) {
        NeoRenderPoint p = new NeoRenderPoint();
        p.bitmapIndex = 0;
        p.x = point.x;
        p.y = point.y;
        p.size = size;
        return p;
    }
}
